# Troubleshooting_Unity3D

# Xcode Build error (1) ld: library not found for -lStaticAppSec_Debug

This linker error occurs when the libStaticAppSec_Debug.a file is not exist in the designated folder or corrupted. The libStaticAppSec_Debug.a file should be exist in following path.

"Xcode_Pizza (Unity Exported Project folder) > Libraries > AppSealingSDK > Libraries > libStaticAppSec_Debug.a"

If the file is missing (or maybe corrupted) try to copy it again into "Libraries" folder.

You can find the original libStaticAppSec_Debug.lib file in the Unity project folder on the assumption that you already imported AppSealing asset into your project.

Copy the "libStaticAppSec_Debug.lib" file to Xcode project's designated folder and rename it to "libStaticAppSec_Debug.a" then try build again.

This step is also applied to the linker error that says "ld: library not found for -lStaticAppSec" by just replacing "lStaticAppSec_Debug" to "lStaticAppSec". For Release builds, the file “libStaticAppSec.a” must exist in the correct location.

" Xcode_Pizza (Unity Exported Project folder) > Libraries > AppSealingSDK > Libraries > libStaticAppSec.a "

# Xcode Build error (2) Undefined symbols for architecture arm64: "_Unity_Is AbnormalEnvironmentDetected"

This linker error occurs when the value of "Other Linker Flags" field within "Build Settings" configuration section is missing or invalid.

First, check "Build Settings" of main target ‘Unity-iPhone’ for "Other Linker Flags" field value.

Now, restore the "Other Linker Flags" settings by following steps.

  1. Clear the setting value : select "Other Linker Flags" row and press 'Delete' key.

  2. Expand "Other Linker Flags" by clicking the triangle icon left to "Other Linker Flags"

  1. Select "Debug" item and click to edit/insert value, then type in following text.

-lStaticAppSec_Debug -L$(PROJECT_DIR)/Libraries/AppSealingSDK/Libraries

  1. Select "Release" item and click to edit/insert value, then type in following text.

-lStaticAppSec -L$(PROJECT_DIR)/Libraries/AppSealingSDK/Libraries

  1. For "ReleaseForProfiling" and "ReleaseForRunning" items enter the following text.

-lStaticAppSec -L$(PROJECT_DIR)/Libraries/AppSealingSDK/Libraries

  1. Select “PROJECT > Unity-iPhone” and set the value of the “Other Linker Flags” field in “Build Settings” as the main target setting.

# Execution error (1) App terminated immediately after launch

If your app has terminated right after launching in device, you should check the execution log message whether your bundle ID is valid.

If the log message contains string like " ==>> FAILED( Not registered bundle name )" then it tells the bundle Id you used for Unity App is not registered properly at AppSealing Developer Center while downloading unitypackage file.

Please read the contents of items Compare Bundle ID again carefully and check for incorrect or missing steps.

# Execution error (2) App terminated suddenly while running

If your app has terminated suddenly while running about after 20 seconds from launching you should check the execution log message whether you have run your app with Release configuration.

If the log message contains string like "Message from debugger: Terminated due to signal 14" then it tells that you have built & run your app in Release configuration and so AppSealing detection logic has activated. AppSealing logic in Release configuration checks some security intrusion such as jailbreak, debugger attachment, execution file encryption flag and if there is some problem it will close the app after 20 seconds irrespectively of user action or other circumstances.

Only in Release configuration the AppSealing logic will be activated and will terminate your app, so you should run your app with Debug configuration until you distribute the app to AppStore or TestFlight because the built executable file doesn't have encrypted with FairPlay DRM before it is installed from AppStore to device. AppSealing logic will detect that executable file has decrypted abnormally and it will terminate the app after 20 seconds while running your app in device at Xcode.

# Cannot execute “generate_hash” : Permission denied

It may happens that script execution in step 2-5 “Generate App integrity and certificate snapshot” fails by “Permission denied” error message like below.

In this situation run add permission command like below and try again.

$ chmod +x Libraries/AppSealingSDK/Tools/generate_hash

# Using AppSealing SDK in Continuous Integration Tools

AppSealing SDK can be integrated naturally into CI (continues integration) tools such as "Buddy" or "Jenkins" etc. Once the AppSealing unitypackage has imported into your unity project, you can build and export the project with command line shell script as usual.

Last Updated: 11/19/2024, 6:55:37 AM